//
//  TDNoDataView.m
//  EBOexchange
//
//  Created by WWJ on 2018/1/20.
//  Copyright © 2018年 ebo. All rights reserved.
//

#import "TDNoDataView.h"

@implementation TDNoDataView

- (instancetype)initWithFrame:(CGRect)frame img:(UIImage *)img title:(NSString *)title
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initSubViewWithFrame:frame img:img title:title];
    }
    return self;
}
- (void)initSubViewWithFrame:(CGRect)frame img:(UIImage *)img title:(NSString *)title{
    
    UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
    btn.center = self.center;
    btn.y = btn.y-kNavHeight-150;
    [btn setImage:img forState:UIControlStateNormal];
    btn.imageView.contentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:btn];
    UILabel *lab = [UILabel labelWithFrame:CGRectMake(CGRectGetMinX(btn.frame), CGRectGetMaxY(btn.frame)+5, btn.width, 20) font:FONT(14) color:kGrayColor text:title];
    lab.textAlignment = 1;
    [self addSubview:lab];
    [btn setUserInteractionEnabled:NO];
    [self setBackgroundColor:[UIColor whiteColor]];
}
@end
